﻿namespace EnterpriseLibraryExtensions.Events.Aggregation
{
    /// <summary>
    /// The enum controls how an event aggregation scope behaves.
    /// </summary>
    public enum EventAggregationMode
    {
        /// <summary>
        /// Starts a new scope or enlists the scope in the ambient scope.
        /// </summary>
        Required,

        /// <summary>
        /// Starts a new scope and sets the ambient scope to the new one.
        /// Events in this scope will be raised on a completed dispose even if the surrounding scope fails.
        /// </summary>
        RequireNew,
        
        /// <summary>
        /// Raises events on dispose no matter if complete has been called. Disable does not
        /// enlist events into a surrounding scope.
        /// </summary>
        Disable
    }
}
